SRC = $(wildcard *.c)
BIN = xm
OBJ = $(SRC:.c = .o)
CC = gcc



$(BIN):$(OBJ)
	@$(CC) -o $@ $^
	@echo "linking ... $^ to $@"
%.o:%.c
	@$(CC) -c $<
	@echo"compling ... $< to $@"

.PHONY:clean
clean:
	rm -f $(BIN) $(OBJ)

